package com.zzptc.sky.myapplication;

import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Window;

public class WelcomeActivity extends AppCompatActivity {
    private boolean isFirstIn = false;
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        SharedPreferences sp = getSharedPreferences("first_in",MODE_PRIVATE);
        isFirstIn = sp.getBoolean("isFirstIn",true);

        if (isFirstIn){
            intent = new Intent(this,YindaoActivity.class);
        }else {
            intent = new Intent(this,HuanyingActivity.class);
        }
        startActivity(intent);
        finish();
    }
}
